package com.leyou.item.api;

import com.leyou.item.pojo.Specification;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

@RequestMapping("spec")
public interface SpecApi {

    /**
     * 查询商品分类对应的规格参数
     * @param id
     * @return
     */
    @GetMapping("{id}")
    public String querySpecificationByCategoryId(@PathVariable("id") Long id);
    /**
     * 新增
     * @param specification
     */
    @PostMapping
    public ResponseEntity<Void> addSpec(Specification specification);

    /**
     * 更新
     * @param specification
     */
    @PutMapping
    public ResponseEntity<Void>  updateSpec(Specification specification);

    /**
     * 删除
     * @param id
     */
    @DeleteMapping("{id}")
    public ResponseEntity<Void>  deleteSpec(@PathVariable("id")Long id);
}
